import service from '@/utils/request';

export const getlistDataInfo = (pageIndex , pageSize ) => {
    return service({
        url: '/UserApi/data_manage/listData',
        method: 'get',
        params: {
            pageIndex,
            pageSize,
        },
    })
};

export const deleteDataInfo = (data) => {
    return service({
      url: '/UserApi/data_manage/deleteData',
      method: 'post',
      data:data
    })
  };

// 添加数据
export const addData = (data) => {
    return service({
      url: '/UserApi/data_manage/addData',
      headers:{
        "Content-type":"multipart/form-data"
      },
      method: 'post',
      data:data
})
  };

// 下载数据
export const downLoadInfo = (data) => {
  return service({
    url: '/UserApi/data_manage/downloadData',
    method: 'get',
    params:data
  })
};

// 修改数据
export const updateData = (data) => {
  return service({
    url: '/UserApi/data_manage/updateData',
    headers:{
      "Content-type":"multipart/form-data"
    },
    method: 'post',
    data:data
})
};

// 获取详情
export const getDataDetail = (data) => {
  return service({
      url: '/UserApi/data_manage/getDetailData',
      method: 'get',
      params: {
          "DataID":data
      },
  })
};

